<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="antd.min.css">
    <script src="vue.min.js"></script>
    <script src="antd.min.js"></script>
</head>
<body>
    <div id="app">
        <div>
            <a-table v-bind="attrs" :columns="columns" bordered>
                <span slot="id" slot-scope="text">
                    <a href="javascript:;"@click="del(text)">删除</a>
                </span>
            </a-table>
        </div>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                columns:[{
                    title:"简介",
                    dataIndex:"info",
                    key:"info",
                    align:"center"
                },
                {
                    title:"姓名",
                    dataIndex:"name",
                    key:"name",
                    align:"center"
                },
                {
                    title:"年龄",
                    dataIndex:"age",
                    key:"age",
                    align:"center"
                },
                {
                    title:"操作",
                    dataIndex:"id",
                    key:"id",
                    align:"center",
                   scopedSlots:{
                       customRender:"id"
                   },
                }],
                attrs:{
                    dataSource:[{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },
                    {
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },
                    {
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    },{
                        id:1,
                        name:"刘佳",
                        info:"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈",
                        age:20
                    }],rowkey:"id"
                }
            },
            methods:{
                del:function(val){
                    this.attrs.dataSource.splice(val-1,1);
                    this.$message.success("删除成功");
                }
            }
        })
    </script>
</body>
</html>